CompareText(IList<DocumentPageText>) Method
Example
using Leadtools.Document;
using Leadtools.Document.Compare;
using Leadtools;
public void CompareTextDocumentPageTextExample()
{
var doc1 = DocumentFactory.LoadFromFile(pathToDocument1, new LoadDocumentOptions());
var doc2 = DocumentFactory.LoadFromFile(pathToDocument2, new LoadDocumentOptions());
var textList = new List<DocumentPageText>()
{
doc1.Pages.First().GetText(),
doc2.Pages.First().GetText()
};
var comparer = new DocumentComparer();
var diffs = comparer.CompareText(textList);
foreach (TextDifference diff in diffs)
{
Console.WriteLine($"Operations: {diff.Operation}");
Console.WriteLine($"Text: {diff.Text}");
Console.WriteLine("--------");
}
}